/**
 * Copyright (c) OpenSpug Organization. https://github.com/openspug/spug
 * Copyright (c) <spug.dev@gmail.com>
 * Released under the AGPL-3.0 License.
 */
import { observable } from "mobx";
import {PermissionList} from "../../../../api/work/system/RuleApi";

class Store {

    @observable records = [];

    @observable record = {};

    //添加模块弹窗
    @observable addModuleVisible = false;

    //添加页面弹窗
    @observable addPageVisible = false;

    //添加功能弹窗
    @observable addZoneVisible = false;

    //模块id
    @observable pid;

    //页面id
    @observable id;

    //按钮loading
    @observable loading = false;

    fetchRecords = () => {
        this.records = [];
        PermissionList().then(response => {
            if (response.data.code === 200){
                this.records = response.data.list;
            }
        });
    };
}

export default new Store()
